#!/bin/bash
# TODO: provide name of .java file to be checked on the command line

# Compile our custom checks
javac -cp checkstyle-5.6-all.jar *.java
# Build a jar with our custom check files
jar cvf jdchecks-0.3.jar LogicCommentCheck.class VariableNameLengthCheck.class AccessModifierCheck.class
# Run checkstyle with our custom check on the file provided on command line
java -classpath jdchecks-0.3.jar:checkstyle-5.6-all.jar \
     com.puppycrawl.tools.checkstyle.Main \
     -c customchecks5-6.xml -r  BadStyleExample.java
